package kr.co.hanbit;

abstract class Unit {
	protected String name;
	protected int energy;
	abstract public void decEnergy();
	public int getEnergy(){
		return energy;
	}

}


class Terran extends Unit{
	boolean fly;
	public Terran(String n, boolean b){
		name = n;
		energy = 100;
		fly = b;
				
	}
	public void decEnergy(){
		energy -= 3;
	}
}

class Zerg extends Unit{
	boolean fly;
	public Zerg(String n, boolean b){
		name = n;
		energy =100;
		fly =b;
	}
	public void decEnergy(){
		energy -= 6;
	}
}

class Protoss extends Unit{
	boolean fly;
	public Protoss(String n, boolean b){
		name = n;
		energy =100;
		fly =b;
	}
	public void decEnergy(){
		energy--;
	}
}

